package extendS;
interface Ifly1{
    public abstract void fly();
    public static void fun(){
        System.out.println(4);
    }
    default void fun3(){
        System.out.println(3);
    }
}
interface Irun1{
    public abstract void run();
}
//用extends扩展Ibasic接口
interface Ibasic extends Ifly1,Irun1{

    //可使用default对扩展接口中的抽象方法进行实现
    default void fly() {
        System.out.println("人在飞");
    }
    public abstract void eat();
}

class Peerson implements Ibasic{


//实现接口Ibasic接口中未实现完的抽象方法
//，Ibasic接口已经实现了Ifly接口的方法了
    @Override
    public void run() {
        System.out.println("人在跑");
    }

    @Override
    public void eat() {
        System.out.println("人在恰饭");
    }
}
public class Demo5 {
    public static void main(String[] args) {
        Peerson person =new Peerson();
        person.eat();
        person.fly();
        person.run();
        person.fun3();
        //Comparable
    }
}
